<%@ page contentType="text/html; charset=UTF-8" %>
<%  response.addDateHeader("Expires", 0);response.setHeader("Pragma","no-cache"); response.setHeader("Cache-Control","no-cache");%>
<%
	String totalPageSizeStr = request.getParameter("totalPageSize");
	String currPageNumStr = request.getParameter("currPageNum");
	
	// 总页数
	int totalPageSize = 1;
	if(totalPageSizeStr != null){
		totalPageSize = Integer.valueOf(totalPageSizeStr);
	}
	if(totalPageSize == 0) {
		totalPageSize = 1;
	}
	// 当前页号
	int currPageNum = 1;
	if(currPageNumStr != null){
		currPageNum = Integer.valueOf(currPageNumStr);
	}
%>
<table  border="0" align="right" cellpadding="3" cellspacing="0">
     <tr align="center">
       <td align="center"><%=currPageNum%>/<%=totalPageSize %></td>
       <td align="center">
       		<a href="#" onclick="firstPage();">第一页</a>
       	</td>
       <td align="center">
       		<a href="#" onclick="nextPage();">下一页</a>
       </td>
       <td align="center" onclick="previousPage();">
       		<a href="#">上一页</a>
       	</td>
       <td align="center" onclick="lastPage();">
       		<a href="#">最后一页</a>
       	</td>
       <td>&nbsp;</td>
       <td width="50">
		<select name="pageNumSel" id="pageNumSel" style="width: 100%">
       	<%
			for(int i = 0; i < totalPageSize; i++){
	       		String selected = "";
				if(i + 1 == currPageNum){
					selected = "selected='selected'";
				}
		%>
			<option <%=selected%> value="<%=i+1%>"><%=i+1%></option>			
		<%
			}
		%>
		</select>
       </td>
       <td>页</td>
       <td><input name="Button13" type="button" class="button_go" value="" onclick="gotoPage();" style="cursor: hand;"></td>
     </tr>
 </table>